package com.gdpa.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.gdpa.entity.SysUser;
import com.gdpa.mapper.SysUserMapper;
import com.gdpa.service.ISysUserService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 用户信息表 服务实现类
 * </p>
 *
 * @author zsr
 * @since 2018-12-19
 */
@Service
public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> implements ISysUserService {

    @Autowired
    private SysUserMapper sysUserMapper;

    @Override
    public List<SysUser> userPage(Page page, String search) {
        return sysUserMapper.userPage(page,search);
    }

    @Override
    public boolean resetPwd(Integer id) {
        return sysUserMapper.resetPwd(id);
    }

    public boolean modifyMessage(SysUser sysUser){
        return sysUserMapper.modifyMessage(sysUser);
    }

    @Override
    public SysUser showMessage(Integer id) {
        return sysUserMapper.showMessage(id);
    }
}
